home *** CD-ROM | disk | FTP | other *** search
Wrap
Text File | 1996-06-13 | 57.4 KB | 1,748 lines
Set Buffer 25 Screen Open 0,320,200,4,Lowres : Curs Off Close Workbench : Amos Lock Hide Cls 0 If Ntsc=-1 Then PAL=0 Else PAL=1 'Close Editor Dim X(64),Y(64) Dim NOM$(9),SCORE(9) Global NOM$(),SCORE() Dim F$(8),DIE$(4) TITEL: Update On Led Off Load "titleTune" Music 1 Break Off Screen Open 0,320,200,32,Lowres Curs Off Screen Open 1,320,200,2,Lowres Curs Off Load "Title",0 Unpack 0 To 0 Paper 0 : Pen 15 : Locate 15,10 : Print "F1 Start" Locate 15,12 : Print "F2 Music+SFX" Locate 15,14 : Print "F3 PAL" Locate 15,16 : Print "F4 Hiscores" Locate 15,18 : Print "F5 Quit" Blit Store Left 1,1,0,104 To 320,111,-1 Blit Store Left 1,2,0,122 To 320,129,1 Reserve Stars 400 For I=1 To 400 Define Star I,Rnd(319),I/2,Rnd(4)+1,0 Next Colour 1,$FFF Colour 9,$FF Stars Int On 1 Set Rainbow 0,1,280,"","","" Rainbow 0,0,0,280 Colour Back 0 Restore RDATA For C=0 To 279 : Read CVA : Rain(0,C)=CVA Next C : View RDATA: Data $A00,$A00,$FFF,$F0F,$0,$A00,$B60,$F00 Data $FF0,$C0E,$8F0,$A00,$620,$F,$FF0,$FF0 Data $CC,$F,$AF,$B60,$FF0,$F00,$FF0,$F Data $AF,$7C,$F00,$FF,$F,$CC,$D80,$620 Data $F00,$AF,$FF,$FF0,$F,$F00,$B60,$FF Data $7C,$FF,$D80,$F00,$7C,$FF,$FF,$F Data $7C,$F,$C0E,$FF0,$C08,$7C,$D80,$F Data $C0E,$0,$FF0,$F0,$8F0,$7C,$F,$F Data $CC,$FF0,$CC,$F0F,$8F0,$C08,$80,$FFF Data $F0,$C08,$7C,$F0F,$F,$C0E,$70F,$AF Data $8F0,$F0,$8F0,$F0,$CC,$F0F,$F,$C08 Data $C0E,$AF,$F0,$70F,$F,$F0,$C08,$7C Data $F0F,$7C,$F,$B60,$F00,$CC,$CC,$70F Data $F00,$8F0,$B60,$70F,$C08,$A00,$F00,$70F Data $620,$CC,$620,$FF,$F00,$0,$80,$A00 Data $D80,$F00,$FF,$A00,$70F,$80,$B60,$D80 Data $F00,$620,$80,$70F,$F00,$FFF,$D80,$A00 Data $D80,$620,$D80,$FFF,$AF,$B60,$FFF,$FFF Data $A00,$A00,$D80,$7C,$FF0,$FFF,$B60,$A00 Data $FFF,$FF0,$FFF,$D80,$A00,$F0,$F0F,$FFF Data $CC,$AF,$F0F,$AF,$D80,$0,$F0,$C0E Data $0,$C08,$8F0,$8F0,$FF,$0,$0,$B60 Data $8F0,$7C,$C08,$F,$8F0,$80,$80,$0 Data $80,$CC,$C08,$80,$620,$620,$B60,$620 Data $B60,$FFF,$FFF,$B60,$620,$FF,$CC,$0 Data $80,$CC,$620,$CC,$620,$CC,$70F,$C08 Data $F00,$C08,$C08,$C0E,$C0E,$AF,$C0E,$C08 Data $C0E,$AF,$F,$C08,$7C,$AF,$C0E,$CC Data $C0E,$C0E,$7C,$70F,$70F,$D80,$D80,$FF0 Data $D80,$A00,$A00,$0,$0,$0,$0,$0 Data $0,$0,$0,$0,$0,$0,$0,$0 Data $0,$0,$0,$0,$0,$0,$0,$0 Data $0,$0,$0,$0,$0,$0,$0,$0 Data $0,$0,$0,$0,$0,$0,$0,$0 Data $0,$0,$0,$0,$0,$0,$0,$0 Data $0,$0,$0,$0,$0,$0,$0,$0 Blit Int On 1 To 2 Multi No Get Palette 0 PAL=1 Do A$=Inkey$ If Key State(80) Then Goto ANF If Key State(81) and SFX=0 Then Locate 15,12 : Print "F2 Sound-FX " : SFX=1 : Wait 10 If Key State(81) and SFX=1 Then Locate 15,12 : Print "F2 Music+SFX" : SFX=0 : Wait 10 If Key State(82) and PAL=1 Then Locate 15,14 : Print "F3 NTSC" : Doke $DFF1DC,0 : PAL=0 : Wait 10 If Key State(82) and PAL=0 Then Locate 15,14 : Print "F3 PAL " : Doke $DFF1DC,32 : PAL=1 : Wait 10 If Key State(83) Then HISCORE_LOAD["Hiscores"] : TITELHI If Key State(84) Then INDE If A$="c" I$=Input$(7) If I$="heat on" : Boom : CHET=1 : End If End If If A$="u" I$=Input$(8) If I$="nlimited" : Shoot : LIVE=1 : End If End If If A$="o" I$=Input$(2) If I$="ff" : Boom : Wait 10 : Boom : CHET=0 : End If End If If A$="l" I$=Input$(6) If I$="imited" : Shoot : Wait 10 : Shoot : LIVE=0 : End If End If Loop Procedure INDE Multi Yes Stars Int Off Blit Int Off Stars Erase Blit Erase 1 Blit Erase 2 End End Proc ANF: Multi Yes Stars Int Off Blit Int Off Stars Erase Blit Erase 1 Blit Erase 2 'Break On Rainbow Del Screen Close 0 For X=60 To 0 Step -2 Mvolume X Wait 2 Next Music Stop : Wait 5 Mvolume 63 'Close Editor Led Off Screen Open 0,320,200,32,Lowres Colour 1,$0 : Curs Off : Flash Off : Hide Fade 1,$0 : Wait 15 Load "Sprites" Get Sprite Palette : Colour 1,$0 Bob 3,60,75,3 FRANK: Screen Close 0 'Close Editor If SFX=1 Then Music Stop If SFX=0 Then Load "GameMusic" If SFX=0 Then Music 1 Global F$(),LAUNCHED,LIVES,FIN_LEVEL,CHEAT,LEVEL,SCORE,BULLETS 'score screen ' Load "Samples" Screen Open 5,320,31,16,Lowres : Double Buffer : Curs Off : Hide : Flash Off : Get Sprite Palette : Colour 1,$0 Screen Display 5,,211,, 'Paste Bob 0,0,64 Set Rainbow 1,2,16,"","(1,2,7)(1,-2,7)","" Rainbow 1,0,218,15 Autoback 0 Hide On Screen Open 2,320,160,32,Lowres Autoback 0 Flash Off Curs Off Cls 0 Double Buffer Hide On ' ' Hauptprogramm: Repeat If LIVE=1 Then LIVES=99 Else LIVES=5 LAUNCHED=1 BULLETS=1 LEVEL=0 If CHET=1 Then CHEAT=1 Else CHEAT=0 SCORE=0 FIN_LEVEL=True Amreg(9)=SCORE Amreg(20)=BULLETS ' While FIN_LEVEL=True and LEVEL<6 If FIN_LEVEL=True Inc LEVEL LAUNCHED=1 SCRLSPEED=1 If LEVEL mod 2=0 and DEUTSCH=0 VERT_MAIN_LOOP Else If DEUTSCH=0 HORIZ_MAIN_LOOP End If End If Wend ' FINISH_MESSAGE Rainbow Del : Goto TITEL Until False End Procedure FIN_WAIT Clear Key While(Mouse Key=0) and(Joy(1)=0) and(Inkey$="") Wend End Proc Procedure FINISH_MESSAGE Screen 2 : Amal Off : Sprite Off Fade 3,$0,$0,$0,$0,$0,$0,$0,$0,$0,$0,$0,$0,$0,$0,$0,$0,$0,$0,$0,$0,$0,$0,$0,$0,$0,$0,$0,$0,$0,$0,$0,$0 Wait 35 Cls 0 Update Screen 5 Fade 2,$0,$0 Wait 35 Cls 0 Update Screen 2 Colour 4,$B Colour 7,$ADF Gr Writing 0 Ink 3 Ink 4 : Text 120,80,"GAME OVER" For X=63 To 0 Step -2 Mvolume X Wait 2 Next Music Stop Wait 5 Volume 63 Wait 10 Sam Play 1,3 Wait 25 Screen 5 Colour 1,$FFF Wait 5 If FIN_LEVEL=False HISCORE_LOAD["Hiscores"] HISCORE_ENTER[SCORE] HISCORE_SAVE["Hiscores"] Wait Key HISCORE_REMOVE Else Set Rainbow 0,1,290,"","","" : Screen Open 0,640,1000,2,Hires : Palette 0,0 Flash Off : Curs Off : Rainbow 0,0,0,290 C1DAT: Data $0,$111,$222,$333,$444,$555,$666,$777,$888,$999,$AAA,$BBB,$CCC,$DDD,$EEE,$FFF Restore C1DAT : For F=0 To 31 Step 2 : Read CD : Rain(0,F)=CD : Rain(0,F+1)=CD : Next F : For F=31 To 261 : Rain(0,F)=$FFF : Next F Restore C1DAT : For F=230 To 261 Step 2 : Read CD : Rain(0,F)=$FFF-CD : Rain(0,F+1)=$FFF-CD : Next F Print S$ Screen Open 0,640,290,2,Hires : Curs Off : Hide Screen Display 0,,28,, : Palette $0,$FFF Load "EndPic",0 : Unpack 0 To 0 While Fire(1)=0 : Wend Fade 2 : Wait 30 End End If Cls 0 End Proc Procedure CLEAR_AMAL SCORE=Amreg(9) BULLETS=Amreg(20) ' For LOP=0 To 25 Amreg(LOP)=0 Next LOP For LOP=1 To 8 Amreg(LOP)=100 Next LOP ' ' Score! ' Amreg(9)=SCORE ' ' Amount of bullets ' Amreg(20)=BULLETS End Proc Procedure LEVEL1 ' ' Fade 5,$F : Wait 75 Load "Level1",0 : Unpack 0 To 1 ' Screen Hide 1 Screen Display 1,128,-10,320,160 Hide On ' Fade 1,$F Set Rainbow 3,0,60,"(4,1,20)","","" Rainbow 3,0,150,60 ' For LOP=0 To 15 Colour LOP+16,Colour(LOP) Next LOP Wait Vbl Autoback 0 Synchro Off : Update Off ' ' ' ' ' Missile 1(unten -oben) ' Channel 20 To Bob 20 ' Bob 30,240,0,14 ' Bob 31,240,144,15 ' Bob 20,243,145,16 ' ' M$=" Begin: AUtotest(If BC(20,1,8) Jump Next ;" ' M$=M$+" eXit ; Next: Direct Finish) ;" ' M$=M$+" Let X=243 ;" ' M$=M$+" Let Y=165 ;" ' M$=M$+" Move 0,-144,24 ; Let R1=5 ; Jump Delay ;" ' M$=M$+"Finish: Let X=243 ; Let Y=145 ; Let R1=20 ;" ' M$=M$+" Let RJ=RJ+10 ;" ' M$=M$+"Delay: For R0=1 To R1 ; P ; P ; Next R0 ; Jump Begin ;" ' Amal 20,M$ ' 'stalakmit Channel 21 To Bob 21 Bob 21,546,0,27 M2$=" Begin: Let R0=X-20 ;" M2$=M2$+" If XS(1,RX)+RN<R0 Jump Begin ;" M2$=M2$+" Move 0,260,20 ;" Amal 21,M2$ 'stalak ##2 !!!! Channel 32 To Bob 32 Bob 32,746,0,27 M2$=" Begin: Let R0=X-20 ;" M2$=M2$+" If XS(1,RX)+RN<R0 Jump Begin ;" M2$=M2$+" Move 0,260,20 ;" Amal 32,M2$ ' Paste Bob 576,140,36 Paste Bob 448,0,37 Paste Bob 609,0,37 ' For L=23 To 25 Channel L To Bob L Bob L,576+4,0,34 M3$=" Begin: Let X=579 ; Let Y=136 ;" M3$=M3$+" If RN<250 Jump Begin ;" M3$=M3$+" Let R2=Z(80+"+Str$(L)+") ;" M3$=M3$+" If R2>0 Jump Begin ;" M3$=M3$+" AUtotest(If BC("+Str$(L)+",1,8) Jump Next ;" M3$=M3$+" eXit ; Next: Direct Finish) ;" M3$=M3$+" Let R0=XS(2,RX)+RN ; Let R1=YS(2,RW) ;" M3$=M3$+" Move R0-X,R1-Y,Z(10)+12 ;" M3$=M3$+"Finish: Let X=579 ; Let Y=136 ;" M3$=M3$+" For R3=1 To Z(10)+5 ; P ; Next R3 ;" M3$=M3$+" Let RJ=RJ+10 ;" M3$=M3$+" If RN<570 Jump Begin ;" ' Amal L,M3$ Next L For L=26 To 26 Channel L To Bob L Bob L,448+4,0,34 M3$=" Begin: Let X=449 ; Let Y=11 ;" M3$=M3$+" If RN<142 Jump Begin ;" M3$=M3$+" Let R2=Z(80+"+Str$(L)+") ;" M3$=M3$+" If R2>0 Jump Begin ;" M3$=M3$+" AUtotest(If BC("+Str$(L)+",1,8) Jump Next ;" M3$=M3$+" eXit ; Next: Direct Finish) ;" M3$=M3$+" Let R0=XS(2,RX)+RN ; Let R1=YS(2,RW) ;" M3$=M3$+" Move R0-X,R1-Y,Z(10)+12 ;" M3$=M3$+"Finish: Let X=449 ; Let Y=11 ;" M3$=M3$+" For R3=1 To Z(10)+5 ; P ; Next R3 ;" M3$=M3$+" Let RJ=RJ+10 ;" M3$=M3$+" If RN<462 Jump Begin ;" ' Amal L,M3$ Next L ' For L=27 To 27 Channel L To Bob L Bob L,609+4,256,34 M3$=" Begin: Let X=609+1 ; Let Y=11 ;" M3$=M3$+" If RN<300 Jump Begin ;" M3$=M3$+" Let R2=Z(80+"+Str$(L)+") ;" M3$=M3$+" If R2>0 Jump Begin ;" M3$=M3$+" AUtotest(If BC("+Str$(L)+",1,8) Jump Next ;" M3$=M3$+" eXit ; Next: Direct Finish) ;" M3$=M3$+" Let R0=XS(2,RX)+RN ; Let R1=YS(2,RW) ;" M3$=M3$+" Move R0-X,R1-Y,Z(10)+12 ;" M3$=M3$+"Finish: Let X=609+1 ; Let Y=11 ;" M3$=M3$+" For R3=1 To Z(10)+5 ; P ; Next R3 ;" M3$=M3$+" Let RJ=RJ+10 ;" M3$=M3$+" If RN<634 Jump Begin ;" ' Amal L,M3$ Next L ' Channel 39 To Bob 39 Bob 39,571,80,35 M$=" Begin: P ; If BC(39,1,8) Jump Finish ;" M$=M$+" Jump Begin ;" M$=M$+"Finish: Let Y=-50 ;" M$=M$+" If RU>7 Jump Seeya ;" M$=M$+" Let RU=RU+2 ;" M$=M$+"Seeya: Let RJ=RJ+1000 ; P ;" Amal 39,M$ ' Docking area! Reserve Zone 1 Set Zone 1,640,0 To 960,256 ' Wait Vbl End Proc Procedure LEVEL2 Load "Level2",0 : Unpack 0 To 1 Screen Hide 1 Screen Display 1,128,50,320,160 Set Rainbow 3,0,60,"(4,1,20)","","" Rainbow 3,0,150,60 Channel 9 To Rainbow 3 Hide On ' For LOP=0 To 15 Colour LOP+16,Colour(LOP) Next LOP Wait Vbl Autoback 0 Synchro Off : Update Off Amal 9,"Move 0,-300,300" Amal On ' MISSILES Wait Vbl For L=20 To 23 Channel L To Bob L Next L ' Bob 20,270,310,26 ' Bob 21,290,330,26 Paste Bob 0,320,42 ' ' For L=24 To 29 Channel L To Bob L Bob L,9,323,34 M$=" Begin: Let X=9 ; Let Y=323 ;" M$=M$+" If RN<250 Jump Begin ;" M$=M$+" Let R2=Z(80+"+Str$(L)+") ;" M$=M$+" If R2>0 Jump Begin ;" M$=M$+" If Z(120)>0 Jump Begin ;" M$=M$+" AUtotest(If BC("+Str$(L)+",1,8) Jump Next ;" M$=M$+" eXit ; Next: Direct Finish) ;" M$=M$+" Let R0=XS(2,RX) ; Let R1=YS(2,RW)+RN ;" M$=M$+" Move R0-X,R1-Y,Z(10)+10 ;" M$=M$+"Finish: Let X=9 ; Let Y=323 ;" M$=M$+" For R3=1 To Z(10)+5 ; P ; Next R3 ;" M$=M$+" Let RJ=RJ+10 ;" M$=M$+" If RN<570 Jump Begin ;" ' ' ' M3$=" Begin: Let X=579 ; Let Y=216 ;" ' M3$=M3$+" If RN<250 Jump Begin ;" ' M3$=M3$+" Let R2=Z(80+"+Str$(L)+") ;" ' M3$=M3$+" If R2>0 Jump Begin ;" ' M3$=M3$+" AUtotest(If BC("+Str$(L)+",1,8) Jump Next ;" ' M3$=M3$+" eXit ; Next: Direct Finish) ;" ' M3$=M3$+" Let R0=XS(2,RX)+RN ; Let R1=YS(2,RW) ;" ' M3$=M3$+" Move R0-X,R1-Y,Z(10)+12 ;" ' M3$=M3$+"Finish: Let X=579 ; Let Y=216 ;" ' M3$=M3$+" For R3=1 To Z(10)+5 ; P ; Next R3 ;" ' M3$=M3$+" Let RJ=RJ+10 ;" ' M3$=M3$+" If RN<570 Jump Begin " ' Amal L,M$ Next L ' Channel 31 To Bob 31 Bob 31,70,475,35 M$=" Begin: P ; If BC(31,1,8) Jump Finish ;" M$=M$+" Jump Begin ;" M$=M$+"Finish: Let Y=-50 ;" M$=M$+" If RU>7 Jump Seeya ;" M$=M$+" Let RU=RU+2 ;" M$=M$+"Seeya: Let RJ=RJ+1000 ; P ;" Amal 31,M$ ' ' Missile 1(unten -oben) Channel 36 To Bob 36 Channel 39 To Bob 39 Bob 36,330,500,16 Bob 39,-10,400,16 ' M$=" Begin: AUtotest(If BC(20,1,8) Jump Next ;" M$=M$+" eXit ; Next: Direct Finish) ;" M$=M$+" Let X=-10 ;" M$=M$+" Let Y=400 ;" M$=M$+" Move 330,0,24 ; Let R1=5 ; Jump Begin ;" M$=M$+"Finish: Let X=-10 ; Let Y=400 ; Let R1=20 ;" M$=M$+" Let RJ=RJ+10 ;" Amal 39,M$ ' Q$=" Begin: AUtotest(If BC(20,1,8) Jump Next ;" Q$=Q$+" eXit ; Next: Direct Finish) ;" Q$=Q$+" Let X=330 ;" Q$=Q$+" Let Y=500 ;" Q$=Q$+" Move -340,0,24 ; Let R1=5 ; Jump Begin ;" Q$=Q$+"Finish: Let X=330 ; Let Y=500 ; Let R1=20 ;" Q$=Q$+" Let RJ=RJ+10 ;" Amal 36,Q$ ' ' Reserve Zone 1 Set Zone 1,0,481 To 320,736 ' End Proc Procedure LEVEL3 ' ' Fade 5,$0,$0,$0,$10,$30,$50 Load "Level3",0 : Unpack 0 To 1 ' Screen Hide 1 Screen Display 1,128,50,320,160 ' ' Make sure the image of the previous docking area is pasted in the ' correct position ' Hide On ' For LOP=0 To 15 Colour LOP+16,Colour(LOP) Next LOP Wait Vbl Autoback 0 Synchro Off : Update Off ' Wait Vbl ' MISSILES For L=20 To 39 Channel L To Bob L Next L ' ' Missiles (indestructable) ' Bob 37,351,142,44 : Rem 101!!! Bob 38,399,142,44 For L=37 To 38 M$=" Begin: ;" M$=M$+" Let R2=Z(10)+30 ;" M$=M$+" Let R0=X-R2 ; P ;" M$=M$+" If XS(1,RX)+RN<R0 Jump Begin ;" M$=M$+" Let R3=Z(10)+250 ;" M$=M$+" Move -50,0-R3,10 ;" ' M$=M$+" Let A=45 ;" ' M$=M$+" Move 0,-150,0 ;" ' M$=M$+"Finish: Let Y=-50 ;" Amal L,M$ Next L ' ' Missile (shootable!) ' Bob 39,600,140,38 M$=" Begin: AUtotest(If BC(39,1,8) Jump Next ;" M$=M$+" eXit ; Next: Direct Finish) ;" M$=M$+" Let R2=Z(10)+30 ;" M$=M$+" Let R0=X-R2 ; P ;" M$=M$+" If XS(1,RX)+RN<R0 Jump Begin ;" M$=M$+" Let R3=Z(5)+200 ;" M$=M$+" Move -5,-5,100 ;" M$=M$+" Let A=38 ;" M$=M$+" Move 300,-10,20;M -300,-10,20;M 300,10,20;M -400,-10,50;" M$=M$+"Finish: Let Y=-50 ;" Amal 39,M$ ' ' Stalactites ' Bob 25,465,0,27 Bob 26,485,0,27 Bob 27,505,0,27 Bob 28,525,0,27 Bob 29,545,0,27 Bob 30,565,0,27 Bob 31,585,0,27 Bob 32,605,0,27 Bob 33,625,0,27 Bob 34,645,0,27 Bob 35,665,0,27 Bob 36,685,0,27 ' For L=25 To 36 M$=" Begin: Let R0=X-25 ; P ; ;" M$=M$+" If XS(1,RX)+RN<R0 Jump Begin ;" M$=M$+" If YS(1,RW)<Y Jump Begin" M$=M$+" Move 0,280,10 ;" Amal L,M$ Next L ' ' ' Docking area Reserve Zone 1 Set Zone 1,640,0 To 960,256 ' Wait Vbl End Proc Procedure LEVEL4 ' Load "Level4",0 : Unpack 0 To 1 Screen Hide 1 ' ' Make sure the image of the previous docking area is pasted in the ' correct position ' Screen Display 1,128,50,320,160 Hide On ' For LOP=0 To 15 Colour LOP+16,Colour(LOP) Next LOP Wait Vbl Autoback 0 Synchro Off : Update Off Wait Vbl ' For L=20 To 23 Channel L To Bob L Next L Fade 10,$0 Bob 20,80,450,26 Bob 21,80,470,26 Bob 22,80,490,26 Bob 23,80,510,26 Paste Bob 0,320,42 ' For L=20 To 23 M$=" Begin: If BC("+Str$(L)+",1,8) Jump Finish ;" M$=M$+" P ; Jump Begin ;" M$=M$+"Finish: Let X=340 ;" M$=M$+" Let RJ=RJ+50 ;" Amal L,M$ Next L ' ' For L=24 To 29 Channel L To Bob L Bob L,9,323,34 M$=" Begin: Let X=9 ; Let Y=323 ;" M$=M$+" If RN<100 Jump Begin ;" M$=M$+" Let R2=Z(80+"+Str$(L)+") ;" M$=M$+" If R2>0 Jump Begin ;" M$=M$+" If Z(120)>0 Jump Begin ;" M$=M$+" AUtotest(If BC("+Str$(L)+",1,8) Jump Next ;" M$=M$+" eXit ; Next: Direct Finish) ;" M$=M$+" Let R0=XS(2,RX) ; Let R1=YS(2,RW)+RN ;" M$=M$+" Move R0-X,R1-Y,Z(10)+10 ;" M$=M$+"Finish: Let X=9 ; Let Y=323 ;" M$=M$+" For R3=1 To Z(10)+5 ; P ; Next R3 ;" M$=M$+" Let RJ=RJ+10 ;" M$=M$+" If RN<260 Jump Begin ;" Amal L,M$ Next L ' Channel 31 To Bob 31 Bob 31,280,420,35 M$=" Begin: P ; If BC(31,1,8) Jump Finish ;" M$=M$+" Jump Begin ;" M$=M$+"Finish: Let Y=-50 ;" M$=M$+" If RU>7 Jump Seeya ;" M$=M$+" Let RU=RU+2 ;" M$=M$+"Seeya: Let RJ=RJ+1000 ; P ;" Amal 31,M$ ' ' Channel 39 To Bob 39 Bob 39,802,117,35 M$=" Begin: P ; If BC(39,1,8) Jump Finish ;" M$=M$+" Jump Begin ;" M$=M$+"Finish: Let Y=-50 ;" M$=M$+" If RU>7 Jump Seeya ;" M$=M$+" Let RU=RU+2 ;" M$=M$+"Seeya: Let RJ=RJ+1000 ; P ;" Amal 39,M$ ' ' Paste Bob 65,550,24 Reserve Zone 1 Set Zone 1,65,550 To 65+32,550+24 ' End Proc Procedure LEVEL5 ' Fade 2 Load "Level5",0 : Unpack 0 To 1 ' Screen Hide 1 Screen Display 1,128,50,320,160 Set Rainbow 2,0,65,"(4,-1,15)","(4,-1,15)","(4,-1,15)" Rainbow 2,0,47,65 Set Rainbow 3,0,65,"(4,1,15)","(4,1,15)","(4,1,15)" Rainbow 3,0,146,65 ' ' Make sure the image of the previous docking area is pasted in the ' correct position ' Hide On ' For LOP=0 To 15 Colour LOP+16,Colour(LOP) Next LOP Wait Vbl Autoback 0 Synchro Off : Update Off ' For L=20 To 29 Channel L To Bob L M$=" Begin: AUtotest(If BC("+Str$(L)+",1,8) Jump Next ;" M$=M$+" eXit ; Next: Direct Finish) ;" M$=M$+" For R0=0 To Z(3) ; P ; Next R0 ;" M$=M$+" Let X=970 ;" M$=M$+" Let Y=Z(100)+10 ; Let R1=Z(50)+40 ;" M$=M$+" A 0,(12,3)(55,3)(56,3)(57,3);Move -980,0,R1 ;" M$=M$+" If RN<630 Jump Begin ;" M$=M$+" Finish: Let X=700 ; Let Y=-50 ; " M$=M$+" Let RJ=RJ+10 ;" M$=M$+" If RN<630 Jump Begin ;" M$=M$+" Seeya: Let Y=-50 ;" Bob L,650,-50,12 Amal L,M$ Next L ' ' Missiles ' Bob 30,370,136,44 Bob 31,630,139,44 Bob 32,439,139,44 ' For L=30 To 32 Channel L To Bob L M$=" Begin: AUtotest(If BC("+Str$(L)+",1,8) Jump Next ;" M$=M$+" eXit ; Next: Direct Finish) ;" M$=M$+" Let R2=Z(10)+50 ;" M$=M$+" Let R0=X-R2 ; P ;" M$=M$+" If XS(1,RX)+RN<R0 Jump Begin ;" M$=M$+" Let R3=Z(20)+20 ;" M$=M$+" Move -150,-150,20 ;" M$=M$+" Let A=45 ;" ' M$=M$+" Move -150,-150,20 ;" M$=M$+"Finish: Let Y=-50 ;" Amal L,M$ Next L ' ' Docking area Reserve Zone 1 Set Zone 1,640,0 To 960,256 ' Wait Vbl End Proc Procedure LEVEL6 ' Load "Level6",0 : Unpack 0 To 1 Screen Hide 1 ' ' Make sure the image of the previous docking area is pasted in the ' correct position ' Screen Display 1,128,50,320,160 Hide On ' For LOP=0 To 15 Colour LOP+16,Colour(LOP) Next LOP Wait Vbl Autoback 0 Synchro Off : Update Off Wait Vbl ' Paste Bob 285,238,36 Paste Bob 218,255,42 Paste Bob 183,326,37 Paste Bob 48,288,15 Paste Bob 48,400,15 Paste Bob 100,350,15 ' Channel 21 To Bob 21 Bob 21,285+3,234,34 M$=" Begin: Let X=285+3 ; Let Y=234 ;" M$=M$+" If RN<60 Jump Begin ;" M$=M$+" If Z(120)>0 Jump Begin ;" M$=M$+" AUtotest(If BC(21,1,8) Jump Next ;" M$=M$+" eXit ; Next: Direct Finish) ;" M$=M$+" Let R0=XS(2,RX) ; Let R1=YS(2,RW)+RN ;" M$=M$+" Move R0-X,R1-Y,Z(10)+10 ;" M$=M$+"Finish: Let X=285+3 ; Let Y=234 ;" M$=M$+" For R3=1 To Z(10)+5 ; P ; Next R3 ;" M$=M$+" Let RJ=RJ+10 ;" M$=M$+" If RN<250 Jump Begin ;" ' Amal 21,M$ For L=22 To 23 Channel L To Bob L Bob L,237,258,34 M$=" Begin: Let X=227 ; Let Y=258 ;" M$=M$+" If RN<70 Jump Begin ;" M$=M$+" If Z(120)>0 Jump Begin ;" M$=M$+" AUtotest(If BC("+Str$(L)+",1,8) Jump Next ;" M$=M$+" eXit ; Next: Direct Finish) ;" M$=M$+" Let R0=XS(2,RX) ; Let R1=YS(2,RW)+RN ;" M$=M$+" Move R0-X,R1-Y,Z(10)+10 ;" M$=M$+"Finish: Let X=226 ; Let Y=258 ;" M$=M$+" For R3=1 To Z(10)+5 ; P ; Next R3 ;" M$=M$+" Let RJ=RJ+10 ;" M$=M$+" If RN<250 Jump Begin ;" ' Amal L,M$ Next L Channel 24 To Bob 24 Bob 24,47,289,13 M$=" Begin: Let X=47 ; Let Y=289 ;" M$=M$+" If RN<150 Jump Begin ;" M$=M$+" If Z(120)>0 Jump Begin ;" M$=M$+" AUtotest(If BC(24,1,8) Jump Next ;" M$=M$+" eXit ; Next: Direct Finish) ;" M$=M$+" Let R0=XS(2,RX) ; Let R1=YS(2,RW)+RN ;" M$=M$+" Move R0-X,R1-Y,Z(5)+15 ;" M$=M$+"Finish: Let X=47 ; Let Y=289 ;" M$=M$+" For R3=1 To Z(10)+5 ; P ; Next R3 ;" M$=M$+" Let RJ=RJ+10 ;" M$=M$+" If RN<310 Jump Begin ;" Amal 24,M$ ' ' '--||-- # Hauptwächter # '--\/-- **************** ' Channel 25 To Bob 25 Bob 25,273+4,2000+5,48 M$=" Begin: Let X=273+4 ; Let Y=2000+5 ; Let R2=15 ;" M$=M$+" Anim 1,(48,300)(49,50)(50,50)(51,50)(52,50) ;" M$=M$+" If RN<190 Jump Begin ;" M$=M$+" If Z(120)>0 Jump Begin ;" M$=M$+" AUtotest(If BC(25,1,8) Jump Next ;" M$=M$+" eXit ; Next: Direct Finish) ;" M$=M$+"K: Let R0=XS(2,RX) ; Let R1=YS(2,RW)+RN ;" M$=M$+" Move R0-X+10,R1-Y-10,20 ;" M$=M$+" For R3=1 To Z(5)+5 ; P ; Next R3 ;" M$=M$+" Let R2=R2-1 ; Jump K ;" M$=M$+"Finish: Let X=273+4 ; Let Y=2000+5 ;" M$=M$+" For R3=1 To Z(10)+5 ; P ; Next R3 ;" M$=M$+" Let RJ=RJ+10 ;" M$=M$+" If RN<290 Jump Begin ;" Amal 25,M$ ' For L=26 To 27 Channel L To Bob L Bob L,47,401,13 M$=" Begin: Let X=47 ; Let Y=401 ;" M$=M$+" If RN<310 Jump Begin ;" M$=M$+" If Z(120)>0 Jump Begin ;" M$=M$+" AUtotest(If BC("+Str$(L)+",1,8) Jump Next ;" M$=M$+" eXit ; Next: Direct Finish) ;" M$=M$+" Let R0=XS(2,RX) ; Let R1=YS(2,RW)+RN ;" M$=M$+" Move R0-X,R1-Y,Z(10)+10 ;" M$=M$+"Finish: Let X=47 ; Let Y=401 ;" M$=M$+" For R3=1 To Z(10)+5 ; P ; Next R3 ;" M$=M$+" Let RJ=RJ+10 ;" M$=M$+" If RN<430 Jump Begin ;" ' Amal L,M$ Next L ' For L=28 To 29 Channel L To Bob L Bob L,184,337,34 M$=" Begin: Let X=184; Let Y=337 ;" M$=M$+" If RN<300 Jump Begin ;" M$=M$+" If Z(120)>0 Jump Begin ;" M$=M$+" AUtotest(If BC("+Str$(L)+",1,8) Jump Next ;" M$=M$+" eXit ; Next: Direct Finish) ;" M$=M$+" Let R0=XS(2,RX) ; Let R1=YS(2,RW)+RN ;" M$=M$+" Move R0-X,R1-Y,Z(10)+10 ;" M$=M$+"Finish: Let X=184 ; Let Y=337 ;" M$=M$+" For R3=1 To Z(10)+5 ; P ; Next R3 ;" M$=M$+" Let RJ=RJ+10 ;" M$=M$+" If RN<400 Jump Begin ;" ' Amal L,M$ Next L ' Reserve Zone 1 Set Zone 1,250,580 To 320,600+24 ' End Proc Procedure VERTICAL_SHIP ' ~~~~~ Ship Movement ~~~~~ SHIP$=" Jump Setanim ;" ' ' This line reads the current joystick value into the register R0 and ' then puts the X and Y positions of the hardware sprite into the ' external registers RX and RW. This allows our basic program and the ' other AMAL programs to find out where the ship is on the screen. ' SHIP$=SHIP$+" Begin: Let R0=Joy1 ; Let RX=X ; Let RW=Y" ' ' These lines check for collisions, the first deals with bobs. The ' second line looks at the external register RZ (Amreg(25)). If ' the value in the register equals one we blow up the ship, the value ' stored here is generated by the basic part of the program checking ' collisions with the background graphics. ' SHIP$=SHIP$+" If BC(15,20,29) Jump Explode ;" SHIP$=SHIP$+" If RZ=1 Jump Explode ;" ' ' These lines make sure the players ship does not leave the screen ' playing area. Remember these numbers are all HARDWARE coordinates. ' SHIP$=SHIP$+" If X<140 Jump V ;" SHIP$=SHIP$+" If X>418 Jump Q ;" SHIP$=SHIP$+" If Y>160 Jump N ;" SHIP$=SHIP$+" If Y<60 Jump K ;" ' ' Now we start to move the ship, depending on the joystick movements. ' This line jumps to the label "T" if the joystick is moved AND the ' fire button has been pressed. ' SHIP$=SHIP$+" If R0>16 Jump T ;" ' ' If the joystick is moved in any direction the program jumps to the ' correct label and moves the ship. ' 1=UP 2=DOWN 4=LEFT 8=RIGHT 5=LEFT+UP 10=RIGHT+DOWN ' 9=RIGHT+UP 6=LEFT+DOWN ' SHIP$=SHIP$+" Movement: If R0=1 Jump Up ;" SHIP$=SHIP$+" If R0=2 Jump Down ;" SHIP$=SHIP$+" If R0=4 Jump Left ;" SHIP$=SHIP$+" If R0=8 Jump Right ;" SHIP$=SHIP$+" If R0=5 Jump H ;" SHIP$=SHIP$+" If R0=10 Jump O ;" SHIP$=SHIP$+" If R0=9 Jump Y ;" SHIP$=SHIP$+" If R0=6 Jump G ;" SHIP$=SHIP$+" Checkfire: If R0&16 Jump Fire ;" SHIP$=SHIP$+" Jump Begin ;" SHIP$=SHIP$+" Tovement: If R0=17 Jump Up ;" SHIP$=SHIP$+" If R0=18 Jump Down ;" SHIP$=SHIP$+" If R0=20 Jump Left ;" SHIP$=SHIP$+" If R0=24 Jump Right ;" SHIP$=SHIP$+" If R0=21 Jump H ;" SHIP$=SHIP$+" If R0=26 Jump O ;" SHIP$=SHIP$+" If R0=25 Jump Y ;" SHIP$=SHIP$+" If R0=22 Jump G ;" SHIP$=SHIP$+" Jump Begin ;" SHIP$=SHIP$+" H: ; Move 0-RK,0-RK,1 ; Jump C ;" SHIP$=SHIP$+" O: ; Move RK,RK,1 ; Jump C ;" SHIP$=SHIP$+" Y: ; Move RK,0-RK,1 ; Jump C ;" SHIP$=SHIP$+" G: ; Move 0-RK,RK,1 ; Jump C ;" SHIP$=SHIP$+" Up: ; Move 0,0-RK,1 ; Jump C ;" SHIP$=SHIP$+" Down: ; Move 0,RK,1 ; Jump C ;" SHIP$=SHIP$+" Right: ; Move RK,0,1 ; Jump C ;" SHIP$=SHIP$+" Left: ; Move 0-RK,0,1 ; Jump C ;" SHIP$=SHIP$+" Setanim: Anim 0,(22,10)(23,10) ; Jump Begin ;" SHIP$=SHIP$+" Fire: Let RA=1 ; Jump Begin ;" SHIP$=SHIP$+" V: Let X=140 ; Jump Checkfire ;" SHIP$=SHIP$+" Q: Let X=418 ; Jump Checkfire ;" SHIP$=SHIP$+" N: Let Y=160 ; Jump Checkfire ;" SHIP$=SHIP$+" K: Let Y=60 ; Jump Checkfire ;" SHIP$=SHIP$+"Explode: Anim 1,(5,1)(6,1)(7,1)(8,1)(9,1)(10,1)(11,1) ; P P P P P P P P ; Let Y=0 ; P ; Let RY=99 ;" ' ' Main ship hardware sprite definition ' Screen 2 Channel 15 To Sprite 15 If FIN_LEVEL=True and LEVEL>1 and X Sprite(15)>0 and Y Sprite(15)>0 Sprite 15,,,22 Else If LEVEL=2 Sprite 15,410,130+50,22 End If If LEVEL=4 Sprite 15,390,170,22 End If If LEVEL=6 Sprite 15,336,170,22 End If End If Amreg(10)=5 Amal 15,SHIP$ ' ' ' For L=1 To 8 F$(L)=" Begin: Let Y=-50 ; Let A=25 ; ;" F$(L)=F$(L)+" If R"+Chr$(65+L)+"=100 Jump Begin ;" F$(L)=F$(L)+" Let R"+Chr$(65+L)+"=1 ;" F$(L)=F$(L)+" Let X=RX-128 ; Let Y=YS(2,RW)+RN ;" F$(L)=F$(L)+" Let R3=RW-50 ; Let R1=160-R3 ; Let R2=R1/18 ;" F$(L)=F$(L)+" For R0=1 To 7 ;" F$(L)=F$(L)+" Let Y=Y+18 ;" F$(L)=F$(L)+" If BC("+Str$(L)+",20,40) Jump Killed ;" F$(L)=F$(L)+" Next R0 ;" F$(L)=F$(L)+" Killed: Let R"+Chr$(65+L)+"=2 ; Let X=X-9 ; Let Y=Y+3 ;" F$(L)=F$(L)+" Explode: Anim 1,(5,1)(6,1)(7,1)(8,1)(9,1)(10,1)(11,1) ;" F$(L)=F$(L)+" P P P P P P P P ; Let Y=-50 ;" F$(L)=F$(L)+" Let R"+Chr$(65+L)+"=100 ; Jump Begin ;" Next L ' ' Vertical missiles (all bobs) ' Screen 1 For LOP=1 To 8 Channel LOP To Bob LOP Next LOP For L=1 To 8 Bob L,100,-50,25 Amal L,F$(L) Next L ' ' End Proc Procedure HORIZONTAL_SHIP ' ~~~~~ Ship Movement ~~~~~ SHIP$=" Jump Setanim ;" ' ' This line reads the current joystick value into the register R0 and ' then puts the X and Y positions of the hardware sprite into the ' external registers RX and RW. This allows our basic program and the ' other AMAL programs to find out where the ship is on the screen. ' SHIP$=SHIP$+" Begin: Let R0=Joy1 ; Let RX=X ; Let RW=Y" ' ' These lines check for collisions, the first deals with bobs. The ' second line looks at the external register RZ (Amreg(25)). If ' the value in the register equals one we blow up the ship, the value ' stored here is generated by the basic part of the program checking ' collisions with the background graphics. ' SHIP$=SHIP$+" If BC(15,20,29) Jump Explode ;" SHIP$=SHIP$+" If RZ=1 Jump Explode ;" ' ' These lines make sure the players ship does not leave the screen ' playing area. Remember these numbers are all HARDWARE coordinates. ' SHIP$=SHIP$+" If X<130 Jump V ;" SHIP$=SHIP$+" If X>405 Jump Q ;" SHIP$=SHIP$+" If Y>180 Jump N ;" SHIP$=SHIP$+" If Y<60 Jump K ;" ' ' Now we start to move the ship, depending on the joystick movements. ' This line jumps to the label "T" if the joystick is moved AND the ' fire button has been pressed. ' SHIP$=SHIP$+" If R0>16 Jump T ;" ' ' If the joystick is moved in any direction the program jumps to the ' correct label and moves the ship. ' 1=UP 2=DOWN 4=LEFT 8=RIGHT 5=LEFT+UP 10=RIGHT+DOWN ' 9=RIGHT+UP 6=LEFT+DOWN ' SHIP$=SHIP$+" Movement: If R0=1 Jump Up ;" SHIP$=SHIP$+" If R0=2 Jump Down ;" SHIP$=SHIP$+" If R0=4 Jump Left ;" SHIP$=SHIP$+" If R0=8 Jump Right ;" SHIP$=SHIP$+" If R0=5 Jump H ;" SHIP$=SHIP$+" If R0=10 Jump O ;" SHIP$=SHIP$+" If R0=9 Jump Y ;" SHIP$=SHIP$+" If R0=6 Jump G ;" SHIP$=SHIP$+" Checkfire: Let RX=X ; Let RW=Y ; If R0&16 Jump Fire ;" SHIP$=SHIP$+" Jump Begin ;" SHIP$=SHIP$+" Tovement: If R0=17 Jump Up ;" SHIP$=SHIP$+" If R0=18 Jump Down ;" SHIP$=SHIP$+" If R0=20 Jump Left ;" SHIP$=SHIP$+" If R0=24 Jump Right ;" SHIP$=SHIP$+" If R0=21 Jump H ;" SHIP$=SHIP$+" If R0=26 Jump O ;" SHIP$=SHIP$+" If R0=25 Jump Y ;" SHIP$=SHIP$+" If R0=22 Jump G ;" SHIP$=SHIP$+" Jump Begin ;" ' ' These line move the ship in increments governed by the AMAL register ' RK (amreg(10)). ' SHIP$=SHIP$+" H: ; Move -5,-5,1 ; Jump C ;" SHIP$=SHIP$+" O: ; Move 5,5,1 ; Jump C ;" SHIP$=SHIP$+" Y: ; Move 5,-5,1 ; Jump C ;" SHIP$=SHIP$+" G: ; Move -5,5,1 ; Jump C ;" SHIP$=SHIP$+" Up: ; Move 0,-5,1 ; Jump C ;" SHIP$=SHIP$+" Down: ; Move 0,5,1 ; Jump C ;" SHIP$=SHIP$+" Right: ; Move 5,0,1 ; Jump C ;" SHIP$=SHIP$+" Left: ; Move -5,0,1 ; Jump C ;" SHIP$=SHIP$+" Setanim: Anim 0,(1,10)(2,10); Jump Begin ;" SHIP$=SHIP$+" Fire: Let RA=1 ; Jump Begin ;" SHIP$=SHIP$+" V: Let X=130 ; Jump Checkfire ;" SHIP$=SHIP$+" Q: Let X=405 ; Jump Checkfire ;" SHIP$=SHIP$+" N: Let Y=180 ; Jump Checkfire ;" SHIP$=SHIP$+" K: Let Y=60 ; Jump Checkfire ;" SHIP$=SHIP$+"Explode: Anim 1,(5,1)(6,1)(7,1)(8,1)(9,1)(10,1)(11,1) ; P P P P P P P P ; Let Y=0 ; P ; Let RY=99 ;" ' ' Main ship hardware sprite definition ' Screen 2 Channel 15 To Sprite 15 If FIN_LEVEL=True and LEVEL>1 and X Sprite(15)>0 and Y Sprite(15)>0 Sprite 15,,,1 Else If LEVEL=1 Sprite 15,176,124,1 End If If LEVEL=3 Sprite 15,120+120,72+50,1 End If If LEVEL=5 Sprite 15,128+60,104,1 End If If LEVEL=7 Sprite 15,128+60,104,1 End If End If Amreg(10)=5 Amal 15,SHIP$ ' For L=1 To 8 F$(L)=" Begin: Let Y=-50 ; Let A=4 ;" F$(L)=F$(L)+" If R"+Chr$(65+L)+"=100 Jump Begin ;" F$(L)=F$(L)+" Let R"+Chr$(65+L)+"=1 ;" F$(L)=F$(L)+" Let X=XS(2,RX)+RN+20 ; Let Y=RW-50+6 ;" F$(L)=F$(L)+" Let R3=RX-128 ; Let R1=320-R3 ; Let R2=R1/18 ;" F$(L)=F$(L)+" For R0=1 To 7 ;" F$(L)=F$(L)+" Let X=X+18 ;" F$(L)=F$(L)+" If BC("+Str$(L)+",20,40) Jump Killed ;" F$(L)=F$(L)+" Next R0 ;" F$(L)=F$(L)+" Killed: Let R"+Chr$(65+L)+"=2 ; Let Y=Y-4 ;" F$(L)=F$(L)+" Explode: Anim 1,(5,1)(6,1)(7,1)(8,1)(9,1)(10,1)(11,1) ;" F$(L)=F$(L)+" P P P P P P P P ; Let Y=-50 ; P ; ;" F$(L)=F$(L)+" Let R"+Chr$(65+L)+"=100 ; Jump Begin ;" Next L ' Screen 1 For LOP=1 To 8 Channel LOP To Bob LOP Next LOP ' For L=1 To 8 Bob L,100,-50,4 Amal L,F$(L) Next L End Proc Procedure HISCORE_DISPLAY ' Global SCR_FLG ' Dim C(16) ' ' Unpack the image into screen 7, and fade it down to black Load "Hiscorepic",7 : Unpack 7 To 7 : Ink 0 : Bar 0,200 To 320,256 : Screen Hide For C=0 To 15 : C(C)=Colour(C) : Colour C,0 : Next ' ' This internal flag is set to one if we have to ' enter the name. In this case, we just copy the ' ENTER YOUR NAME picture to the title area at the top of the screen If SCR_FLG Screen Copy 7,82,72,234,123 To 7,82,4 End If ' ' Erase 'Enter your name' from the screen area Cls 0,80,72 To 240,120 ' ' Display the 10 names using a FOR..NEXT loop ' Ink 1,0,0 For I=0 To 9 YP=82+I*9 SCORE$=Mid$(Str$(SCORE(I)),2) LS=Text Length(SCORE$) Text 85,YP,NOM$(I) Text 251-LS,YP,SCORE$ Next I ' ' Now we can fade in the screen Screen Show ' ' Fade the screen back to the original colours Fade 1,C(0),C(1),C(2),C(3),C(4),C(5),C(6),C(7),C(8),C(9),C(10),C(11),C(12),C(13),C(14),C(15) ' Wait until the fade is over Wait 16 ' Pop Proc ' End Proc Procedure HISCORE_REMOVE ' ' Simply fade out the screen to black, and erase it Fade 1 : Wait 16 Screen Close 7 ' End Proc Procedure HISCORE_ENTER[SCORE] ' Global SCR_FLG ' If SCORE>SCORE(9) ' ' Find the position of our new score in the table POS=0 While SCORE<=SCORE(POS) POS=POS+1 Wend ' Move the lower scores one place down For I=9 To POS+1 Step -1 NOM$(I)=NOM$(I-1) SCORE(I)=SCORE(I-1) Next I NOM$(POS)="" SCORE(POS)=SCORE ' ' Display score, with the ENTER YOUR NAME picture along the title SCR_FLG=-1 : HISCORE_DISPLAY ' ' Set up Cursor Flash 15,"(FFF,30)(666,20)" XC=100 : YC=50 ' ' Display Cursor Gosub CURSEUR ' ' Input the name using a REPEAT..UNTIL loop Repeat ' Read keyboard K$=Inkey$ K=Asc(K$) L=Len(NOM$) ' Handle Backspace If K=8 and L>0 DC=0 XC=XC-8 Text XC,YC," " Gosub CURSEUR NOM$=Left$(NOM$,L-1) End If ' Handle cursor If K>13 and L<15 DC=8 Ink 1 : Text XC,YC,K$ XC=XC+8 Gosub CURSEUR NOM$=NOM$+K$ End If ' ' Repeat until a carriage return. Until K=13 ' ' Put the new name into the NOM$ array NOM$(POS)=NOM$ SCORE(POS)=SCORE ' ' Erase screen Flash Off HISCORE_REMOVE SCR_FLG=0 ' End If ' ' Display final array, and return! HISCORE_DISPLAY ' Pop Proc ' ' Simulate a 'fake' text cursor using the DRAW command CURSEUR: Ink 15 : Draw XC,YC+1 To XC+6,YC+1 Return ' End Proc Procedure HISCORE_LOAD[N$] ' ' Handle errors On Error Goto ERREUR ' ' Open a simple sequential file Open In 1,N$ ' Read the names and scores from the disc For I=0 To 9 Line Input #1,NOM$(I),SCORE$ SCORE(I)=Val(SCORE$) Next I ' Close up the file Close 1 ' SKIP: Pop Proc ' ERREUR: Resume SKIP ' End Proc Procedure HISCORE_SAVE[N$] ' ' Handle errors On Error Goto ERREUR ' ' Create a simple sequential file Open Out 1,N$ ' Write the names and scores to the new file For I=0 To 9 Print #1,NOM$(I) Print #1,Str$(SCORE(I)) Next I ' Close the file (ESSENTIAL!) Close 1 ' SKIP: Pop Proc ' ERREUR: Resume SKIP ' End Proc Procedure TITELHI ' Global SCR_FLG ' Dim C(16) ' ' Unpack the image into screen 7, and fade it down to black Rainbow Del : Load "HiscorePic",7 : Unpack 7 To 7 : Screen Hide For C=0 To 15 : C(C)=Colour(C) : Colour C,0 : Next ' ' This internal flag is set to one if we have to ' enter the name. In this case, we just copy the ' ENTER YOUR NAME picture to the title area at the top of the screen If SCR_FLG Screen Copy 7,82,72,234,123 To 7,82,4 End If ' ' Erase 'Enter your name' from the screen area Cls 0,80,72 To 240,120 ' ' Display the 10 names using a FOR..NEXT loop ' Ink 1,0,0 For I=0 To 9 YP=82+I*9 SCORE$=Mid$(Str$(SCORE(I)),2) LS=Text Length(SCORE$) Text 85,YP,NOM$(I) Text 251-LS,YP,SCORE$ Next I Rainbow Del ' Now we can fade in the screen Screen Show ' ' Fade the screen back to the original colours Fade 1,C(0),C(1),C(2),C(3),C(4),C(5),C(6),C(7),C(8),C(9),C(10),C(11),C(12),C(13),C(14),C(15) ' Wait until the fade is over Wait 16 While Fire(1)=0 : Wend Fade 1 : Wait 15 : Screen Close 7 Set Rainbow 0,1,280,"","","" Rainbow 0,0,0,280 Colour Back 0 Restore RDATA For C=0 To 279 : Read CVA : Rain(0,C)=CVA Next C : View RDATA: Data $A00,$A00,$FFF,$F0F,$0,$A00,$B60,$F00 Data $FF0,$C0E,$8F0,$A00,$620,$F,$FF0,$FF0 Data $CC,$F,$AF,$B60,$FF0,$F00,$FF0,$F Data $AF,$7C,$F00,$FF,$F,$CC,$D80,$620 Data $F00,$AF,$FF,$FF0,$F,$F00,$B60,$FF Data $7C,$FF,$D80,$F00,$7C,$FF,$FF,$F Data $7C,$F,$C0E,$FF0,$C08,$7C,$D80,$F Data $C0E,$0,$FF0,$F0,$8F0,$7C,$F,$F Data $CC,$FF0,$CC,$F0F,$8F0,$C08,$80,$FFF Data $F0,$C08,$7C,$F0F,$F,$C0E,$70F,$AF Data $8F0,$F0,$8F0,$F0,$CC,$F0F,$F,$C08 Data $C0E,$AF,$F0,$70F,$F,$F0,$C08,$7C Data $F0F,$7C,$F,$B60,$F00,$CC,$CC,$70F Data $F00,$8F0,$B60,$70F,$C08,$A00,$F00,$70F Data $620,$CC,$620,$FF,$F00,$0,$80,$A00 Data $D80,$F00,$FF,$A00,$70F,$80,$B60,$D80 Data $F00,$620,$80,$70F,$F00,$FFF,$D80,$A00 Data $D80,$620,$D80,$FFF,$AF,$B60,$FFF,$FFF Data $A00,$A00,$D80,$7C,$FF0,$FFF,$B60,$A00 Data $FFF,$FF0,$FFF,$D80,$A00,$F0,$F0F,$FFF Data $CC,$AF,$F0F,$AF,$D80,$0,$F0,$C0E Data $0,$C08,$8F0,$8F0,$FF,$0,$0,$B60 Data $8F0,$7C,$C08,$F,$8F0,$80,$80,$0 Data $80,$CC,$C08,$80,$620,$620,$B60,$620 Data $B60,$FFF,$FFF,$B60,$620,$FF,$CC,$0 Data $80,$CC,$620,$CC,$620,$CC,$70F,$C08 Data $F00,$C08,$C08,$C0E,$C0E,$AF,$C0E,$C08 Data $C0E,$AF,$F,$C08,$7C,$AF,$C0E,$CC Data $C0E,$C0E,$7C,$70F,$70F,$D80,$D80,$FF0 Data $D80,$A00,$A00,$0,$0,$0,$0,$0 Data $0,$0,$0,$0,$0,$0,$0,$0 Data $0,$0,$0,$0,$0,$0,$0,$0 Data $0,$0,$0,$0,$0,$0,$0,$0 Data $0,$0,$0,$0,$0,$0,$0,$0 Data $0,$0,$0,$0,$0,$0,$0,$0 Data $0,$0,$0,$0,$0,$0,$0,$0 ' End Proc Procedure VERT_MAIN_LOOP Repeat If LEVEL=2 LEVEL2 End If If LEVEL=4 LEVEL4 End If If LEVEL=6 LEVEL6 End If CLEAR_AMAL VERTICAL_SHIP Amal On ' ' Init level variables ' BANG1=0 BANG2=0 BANG3=0 BANG4=0 BANG5=0 BANG6=0 LOP=-1 FIN_LEVEL=False ' ' Make sure correct screen is showing ' Screen 2 Get Palette 1 Screen To Front 2 ' ' Start scrolling loop for this level ' Repeat ' ' Increment the area of the background screen to be copied, ' remembering that the maximum Y position to go to is 480. ' This value is then put into Amreg(13) which is the AMAL ' register RN. ' Inc LOP LOP=Min(LOP,480) Amreg(13)=LOP ' ' We must now make sure the program is "tuned" to the Amiga ' by waiting for the next vertical blank. This is a time ' when the electron gun of you monitor/TV moves from the bottom ' right hand corner of the screen, to the top left. If we did ' do this a visable flicker would disrupt our screen copied image. ' Wait Vbl Screen Copy 1,0,LOP,320,LOP+160 To Logic(2),0,0 ' ' Bitmap collision using POINT command. Because AMOS offers no ' method to detect collisions between SPRITEs and BOBs, or ' between SPRITEs and the background landscape I look at ' six specific around the ship to see if a "foriegn" (eg. not ' part of the ship) colour is there. ' X=X Screen(1,X Sprite(15)) Y=Y Screen(1,Y Sprite(15)) BANG1=Point(X,Y) BANG2=Point(X+7,Y+2) BANG3=Point(X+1,Y+4) BANG4=Point(X+7,Y+18) ' BANG5=Point(X+2,Y+10) BANG6=Point(X+7,Y+10) ' ' If the program detects a collision and we decide to blow up ' the ship, the AMAL program which controls it must be informed! ' This is done by passing the value of 1 into the AMAL register ' RZ (or Amreg(25) if you prefer). ' If((BANG1>0 and BANG1<11) or(BANG2>0 and BANG2<11) or(BANG3>0 and BANG3<11) or(BANG4>0 and BANG4<11) or(BANG5>0 and BANG5<11) or(BANG6>0 and BANG6<11)) and CHEAT=0 Amreg(25)=1 Sam Play 2,2 End If ' ' To launch a missile we must first determine if the fire button ' has been pressed. The ship's AMAL program will put a value of ' 1 into Amreg(0) (RA) if this event occurs. There are eight ' missiles, each one has an AMAL register which tells the main ' program whether it is busy or not, these are Amreg(1) to Amreg(8). ' If a missile is already in flight its external register will ' contain the value 100 and the main program will not be able to ' use it. ' If Amreg(0)=1 and Amreg(LAUNCHED)=100 and Fire(1) Amreg(LAUNCHED)=1 Amreg(0)=0 Sam Play 2,1 Amreg(21)=1 End If Add LAUNCHED,1,1 To Amreg(20) ' ' These lines allow the program to perform all of its housekeeping ' and synchronise all of the BOB movements. It also allows us to ' have more than 16 AMAL channels. ' Synchro Update ' ' This line is the end of the loop. If the end of level is ' reached and the player docks the ship OR Amreg(24)=99 we finish. ' Amreg(24) is set when the AMAL program controlling the ship ' has finished the animation to blow up the players ship. ' Amreg(21)=0 Screen 5 Paste Bob 0,0,59 Ink 2,0 : Text 59,17,Str$(LIVES) : Text 150,17,Str$(LEVEL) : Text 239,17,Str$(SCORE) SCORE=Amreg(9) Screen 2 Until(Zone(1,X+4,Y+LOP+10)=1 and LOP>479) or Amreg(24)=99 ' ' If the level has been completed the players ship must be rotated ' ready for the next horizontal level! ' If Amreg(24)<>99 Amal Off 15 Wait 3 Screen Copy 1,LOP,0,LOP+320,160 To Logic(2),0,0 Synchro Update For L=22 To 20 Step -1 Wait 3 Screen Copy 1,LOP,0,LOP+320,160 To Logic(2),0,0 Sprite 15,,,L Synchro Update Wait 3 Next L Wait 5 Screen Copy 1,LOP,0,LOP+320,160 To Logic(2),0,0 Sprite 15,,,2 Synchro Update FIN_LEVEL=True Else Dec LIVES End If ' ' Finally, if you run out of lives or actually finish the level ' this line ends the large loop and returns control back to the ' main program. ' Until LIVES=0 or FIN_LEVEL=True End Proc Procedure HORIZ_MAIN_LOOP Repeat If LEVEL=1 LEVEL1 End If If LEVEL=3 LEVEL3 End If If LEVEL=5 LEVEL5 End If CLEAR_AMAL HORIZONTAL_SHIP Amal On ' ' Init level variables ' THUNDER=0 BANG1=0 BANG2=0 BANG3=0 BANG4=0 BANG5=0 BANG6=0 LOP=-1 FIN_LEVEL=False ' ' Make sure correct screen is showing ' Screen 2 Get Palette 1 Screen To Front 2 ' ' Start scrolling loop for this level ' Repeat ' ' Increment the area of the background screen to be copied, ' remembering that the maximum X position to go to is 640. 'This value is then put into Amreg(13) which is the AMAL ' register RN. ' Inc LOP LOP=Min(LOP,640) Amreg(13)=LOP ' ' These lines control the thunder and lightning. ' A random number is first generated, if it is equal to 1 ' I fade the background colour ( which is colour(0) ) ' to bright white ($FFF). When the sample has started to play ' a value of 1 is put into the variable THUNDER. This is a flag ' which will tell the next part of the program to fade the screen ' background to black again. ' ' If Rnd(200)=1 and Timer>100 and LOP<639 ' ' Amreg(21)=1 'ä Fade 1,$F00 ' Timer=0 'ä THUNDER=1 ' End If ' If THUNDER=1 and Timer>10 ' THUNDER=0 ' Fade 1,$0 'ä ' Timer=0' 'ä' End If ' ' We must now make sure the program is "tuned" to the Amiga ' by waiting for the next vertical blank. This is a time ' when the electron gun of you monitor/TV moves from the bottom ' right hand corner of the screen, to the top left. If we did ' do this a visable flicker would disrupt our screen copied image. ' Wait Vbl Screen Copy 1,LOP,0,LOP+320,160 To Logic(2),0,0 ' ' Bitmap collision using POINT command. Because AMOS offers no ' method to detect collisions between SPRITEs and BOBs, or ' between SPRITEs and the background landscape I look at ' six specific around the ship to see if a "foriegn" (eg. not ' part of the ship) colour is there. ' X=X Screen(2,X Sprite(15)) Y=Y Screen(2,Y Sprite(15)) BANG1=Point(X,Y) BANG2=Point(X+14,Y+2) BANG3=Point(X+2,Y+8) BANG4=Point(X+18,Y+8) ' BANG5=Point(X+9,Y+2) BANG6=Point(X+9,Y+8) ' ' If the program detects a collision and we decide to blow up ' the ship, the AMAL program which controls it must be informed! ' This is done by passing the value of 1 into the AMAL register ' RZ (or Amreg(25) if you prefer). ' If((BANG1>0 and BANG1<11) or(BANG2>0 and BANG2<11) or(BANG3>0 and BANG3<11) or(BANG4>0 and BANG4<11) or(BANG5>0 and BANG5<11) or(BANG6>0 and BANG6<11)) and CHEAT=0 Amreg(25)=1 Sam Play 2,2 End If ' ' To launch a missile we must first determine if the fire button ' has been pressed. The ship's AMAL program will put a value of ' 1 into Amreg(0) (RA) if this event occurs. There are eight ' missiles, each one has an AMAL register which tells the main ' program whether it is busy or not, these are Amreg(1) to Amreg(8). ' If a missile is already in flight its external register will ' contain the value 100 and the main program will not be able to ' use it. ' If Amreg(0)=1 and Amreg(LAUNCHED)=100 and Fire(1) Amreg(LAUNCHED)=1 Amreg(0)=0 Sam Play 2,1 Amreg(21)=1 End If Add LAUNCHED,1,1 To Amreg(20) ' ' These lines allow the program to perform all of its housekeeping ' and synchronise all of the BOB movements. It also allows us to ' have more than 16 AMAL channels. ' Synchro Update ' ' This line is the end of the loop. If the end of level is ' reached and the player docks the ship OR Amreg(24)=99 we finish. ' Amreg(24) is set when the AMAL program controlling the ship ' has finished the animation to blow up the players ship. ' Amreg(21)=0 Screen 5 SCORE=Amreg(9) Paste Bob 0,0,59 Ink 2,0 : Text 59,17,Str$(LIVES) : Text 150,17,Str$(LEVEL) : Text 239,17,Str$(SCORE) Screen 2 Until(Zone(1,X+LOP+7,Y+4)=1 and LOP>639) or Amreg(24)=99 ' ' If the level has been completed the players ship must be rotated ' ready for the next horizontal level! ' If Amreg(24)<>99 If LEVEL<6 Amal Off 15 Wait 3 Screen Copy 1,LOP,0,LOP+320,160 To Logic(2),0,0 Synchro Update For L=20 To 22 Wait 3 Screen Copy 1,LOP,0,LOP+320,160 To Logic(2),0,0 Sprite 15,,,L Synchro Update Wait 3 Next L End If FIN_LEVEL=True Else Dec LIVES End If ' ' Finally, if you run out of lives or actually finish the level ' this line ends the large loop and returns control back to the ' main program. ' Until LIVES=0 or FIN_LEVEL=True End Proc